package com.test.ext;

import org.springframework.context.ApplicationEvent;
import org.springframework.context.event.EventListener;
import org.springframework.stereotype.Service;

/**
 * @author lzy
 * @version v1.0
 * Create DateTime: 2018/12/1 14:36
 */
@Service
public class UserService {
    @EventListener(classes = {ApplicationEvent.class})
    public void listen(ApplicationEvent event) {
        System.out.println("userService监听到的事件" + event);
    }
}
